package com.wlanauth.service.manage.impl;

import java.util.Date;

import org.springframework.beans.BeanUtils;

import com.wlanauth.core.exception.ServiceException;
import com.wlanauth.dao.manage.SystemPropertyLogDao;
import com.wlanauth.domain.manage.SystemProperty;
import com.wlanauth.domain.manage.SystemPropertyLog;
import com.wlanauth.service.common.impl.CommonServiceImpl;
import com.wlanauth.service.manage.SystemPropertyService;

public class SystemPropertyServiceImpl extends CommonServiceImpl<SystemProperty> implements SystemPropertyService {
	
	private SystemPropertyLogDao spLogDao; 
	@Override
	public void save(SystemProperty t) throws ServiceException {
		// TODO Auto-generated method stub
		super.save(t);
		
		SystemPropertyLog log = new SystemPropertyLog();
		BeanUtils.copyProperties(t, log);
		log.setActionTime(new Date());
		log.setActionType("I");
		spLogDao.save(log);
	}

	
}
